#include <iostream>
#include <unordered_set>

using namespace std;

int a[] = {1, 2, 3, 5, 7, 11, 13, 17, 19};

int sg(int x)
{
    unordered_set<int> mp;
    for(auto t : a)
    {
        if(x < t) break;
        mp.insert(sg(x - t));
    }
    for(int i = 0; ; i++) 
        if(!mp.count(i))
            return i;
}

int main()
{
    int n; cin >> n;
    for(int i = 1; i <= 20; i++)
    {
        cout << i << ": " << sg(i) << endl;
    }
    return 0;
}